/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.team1160.breakaway.api;

/**
 * Data structure for 4-motor speeds.  This can
 * be passed between components.
 * 
 * @author nttoole
 */

public class MotorSpeeds {
    
    protected double frontLeft;
    protected double rearLeft;
    protected double frontRight;
    protected double rearRight;

    protected final static double DEFAULT_SPEED = 0.0;

    //---------------------------------------------------------------------

    public MotorSpeeds()
    {
        this(DEFAULT_SPEED);
    }

    //---------------------------------------------------------------------
    
    public MotorSpeeds(double sharedSpeed)
    {
        this(sharedSpeed, sharedSpeed);
    }

    //---------------------------------------------------------------------

    public MotorSpeeds(double left, double right)
    {
        this(left, left, right, right);
    }

    //---------------------------------------------------------------------

    public MotorSpeeds(double fLeft, double rLeft,
                        double fRight, double rRight)
    {
        this.frontLeft  = fLeft;
        this.rearLeft   = rLeft;
        this.frontRight = fRight;
        this.rearRight  = rRight;
    }

    //---------------------------------------------------------------------

    public double getLeftFront()
    {
        return this.frontLeft;
    }

    //---------------------------------------------------------------------

    public double getRightFront()
    {
        return this.frontRight;
    }

    //---------------------------------------------------------------------

    public double getLeftRear()
    {
        return this.rearLeft;
    }

    //---------------------------------------------------------------------

    public double getRightRear()
    {
        return this.rearRight;
    }

    //---------------------------------------------------------------------
    
}
